#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include "ConfProto.h"
#include "tblutil.h"
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\ETT.h>

const char*ETTName = "ETT.dat";

static ETT_REC srETTRec;

static int recordNum;
int	inLoadETTRec (int inRecNumber)
{
	int inRet;

	inRet = inLoadConfRec(ETT_FILENAME, SIZE_ETT_REC, inRecNumber, (char *) &srETTRec);

	recordNum = inRecNumber;
	return inRet;
}

void *pvdGetETTRec(void)
{
	return &srETTRec;

}

int	inSaveETTRec (int inRecNumber)
{
	int inRet;

	inRet = inSaveConfRec(ETT_FILENAME, SIZE_ETT_REC, inRecNumber, (char *) &srETTRec);

	return inRet;
}

int	inGetETTRecNumber (void)
{
	return recordNum;
}

int	inUpdateETTRec (void)
{
	int inRet;

	inRet = inSaveConfRec(ETT_FILENAME, SIZE_ETT_REC, recordNum, (char *) &srETTRec);

	return inRet;
}

void	vdResetETTRec (void)
{
	memset((void*)&srETTRec, 0, REC_SIZEOF(srETTRec));
}

short inGetTenure(void)
{
	return srETTRec.inTenure;
}

void vdSetTenure(short inTenure)
{
	srETTRec.inTenure = inTenure;
}

VS_BOOL fGetEnable(void)
{
	return srETTRec.fEnable;
}

void vdSetEnable(VS_BOOL fEnable)
{
	srETTRec.fEnable = fEnable;
}

